package dao.impl;

import dao.CompanyDao;
import domain.Company;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * Created by liuchang on 2015/6/24.
 */
@Repository
public class CompanyDaoImpl extends BaseGenericDao<Company, Long> implements CompanyDao {

    @Override
    public Company findByOwner(long owner) {
        Map<String, Object> params = newMapBuilder().put("owner", owner).build();
        return queryOne("get-company-by-owner-id", params);
    }

}
